#!/usr/bin/python3



total = 1
go = True
enough = False
while go:
    fish = total
    for k in range(5):
        enough = False
        if((fish - 1) % 5 != 0):
            break
        fish = ((fish - 1) // 5)*4
        if(fish <= 0):
            break
        enough = True
    
    
    if(enough):
        go = False
    else:
        total += 1

print(total)



        
        

